Skip to content

feat(blueprints): add Blueprint-specific service settings - #2965

Merged
rmnbrd merged 29 commits into
stagingfrom
feat/qov-2278-blueprint-specific-settings
Sep 18, 2026
Merged

rmnbrd merged 29 commits into
stagingfrom
feat/qov-2278-blueprint-specific-settings

Conversation

@rmnbrd

@rmnbrd rmnbrd commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Issue: QOV-2278

This PR adds Blueprint-specific settings for Blueprint-based services in the Console.

Changes

  • Added a dedicated Blueprint configuration settings page and sidebar entry.
  • Supported both Terraform- and Helm-based Blueprint services.
  • Reused the Blueprint creation-flow configuration forms, including:
    • persisted variable values;
    • secret-presence handling without exposing secret values;
    • collapsed Overrides section by default;
    • validation and optimistic in-session updates.
  • Restored the standard General settings page for Blueprint services while hiding unsupported source, build/deploy, and deployment-restriction sections.
  • Added Blueprint metadata displaying:
    • Blueprint version;
    • catalog repository;
    • update status.
  • Made the Blueprint version badge link to Blueprint configuration settings when applicable.
  • Improved the Blueprint update flow:
    • preview displayed in a non-dismissible modal;
    • scrollable preview content;
    • fixed action footer;
    • updated button labels;
    • close action returns to Blueprint configuration settings;
    • expanded loading skeleton.
  • Removed Blueprint repository/update indicators from the service Overview header.
  • Added PostHog events:
    • blueprint_settings_visited;
    • blueprint_settings_updated.
  • Added and updated unit tests for settings routing, Blueprint forms, metadata, update flow, and modal behavior.
  • Updated the generated API client dependency for the Blueprint variables endpoint.

Screenshots / Recordings

Testing

  • Targeted Blueprint settings and update-flow tests
  • Changes tested locally in the relevant Console pages and Storybooks
  • yarn test or yarn test -u
  • yarn format
  • yarn lint

PR Checklist

  • I followed naming, styling, and TypeScript rules (see .cursor/rules)
  • I performed a self-review (diff inspected, dead code removed)
  • I titled the PR using Conventional Commits with a scope
  • I only kept necessary comments, written in English
  • I involved a designer to validate UI changes if I am not a designer
  • I covered new business logic with tests
  • I confirmed CI is green
  • I reviewed and executed locally any AI-assisted code

@nx-cloud

nx-cloud Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 4c43b0d

Command Status Duration Result
nx run console:build --parallel=3 --configurati... ✅ Succeeded 1m 8s View ↗
nx affected --target=test --parallel=3 --config... ✅ Succeeded 2m 48s View ↗
nx affected --target=lint --parallel=3 ✅ Succeeded 2m 49s View ↗
nx-cloud record -- yarn nx format:check ✅ Succeeded 8s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-09-18 13:38:11 UTC

@codecov

codecov Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.96262% with 60 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (staging@c2bc18c). Learn more about missing BASE report.
⚠️ Report is 3 commits behind head on staging.

Files with missing lines Patch % Lines
...nt-general-settings/blueprint-general-settings.tsx 79.52% 13 Missing and 13 partials ⚠️
...rvice-blueprint-update-flow/blueprint-metadata.tsx 36.00% 11 Missing and 5 partials ⚠️
libs/shared/ui/src/lib/components/modal/modal.tsx 25.00% 5 Missing and 4 partials ⚠️
...use-blueprint-variables/use-blueprint-variables.ts 0.00% 3 Missing ⚠️
...gs/helm-general-settings/helm-general-settings.tsx 66.66% 0 Missing and 2 partials ⚠️
...vice-general-settings/service-general-settings.tsx 0.00% 1 Missing ⚠️
...rm-general-settings/terraform-general-settings.tsx 66.66% 1 Missing ⚠️
...ervice-settings-layout/service-settings-layout.tsx 83.33% 0 Missing and 1 partial ⚠️
...rint-update-flow/blueprint-update-preview-step.tsx 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             staging    #2965   +/-   ##
==========================================
  Coverage           ?   50.34%           
==========================================
  Files              ?     1352           
  Lines              ?    29343           
  Branches           ?     8654           
==========================================
  Hits               ?    14772           
  Misses             ?    12145           
  Partials           ?     2426           
Flag Coverage Δ
unittests 50.34% <71.96%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rmnbrd
rmnbrd force-pushed the feat/qov-2278-blueprint-specific-settings branch from 410a004 to 4f5eeb0 Compare September 15, 2026 08:49
@rmnbrd
rmnbrd force-pushed the feat/qov-2278-blueprint-specific-settings branch from 9c84a73 to e7c14d8 Compare September 17, 2026 13:58
@rmnbrd
rmnbrd marked this pull request as ready for review September 18, 2026 07:33
Copilot AI lite review requested due to automatic review settings September 18, 2026 07:33
@rmnbrd

rmnbrd commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@cubic-dev Please review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev Please review this PR

@rmnbrd I have started the AI code review. It will take a few minutes to complete.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved review findings affect routing, Blueprint settings behavior, analytics, metadata, and modal handling.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds Blueprint-specific settings, metadata, and update-preview workflows for Terraform- and Helm-based services.

Changes:

  • Adds Blueprint configuration routing, navigation, persistence, validation, and optimistic updates.
  • Refines Blueprint metadata and update-preview modal behavior.
  • Updates shared modal APIs, generated client dependencies, and tests.
File summaries
File Summary and final review notes
yarn.lock Updates generated API client lock data.
package.json Updates the generated API client dependency.
libs/shared/ui/src/lib/components/modal/use-modal/use-modal.tsx Reuses shared modal option types.
libs/shared/ui/src/lib/components/modal/modal.tsx Adds modal dismissal and sizing support.
moderate (3 votes): The default '474' width emits width: 474, which is invalid CSS and changes default modal sizing; numeric strings should retain px while CSS expressions pass through.
libs/shared/ui/src/lib/components/modal/modal-root.tsx Exposes expanded modal options.
libs/domains/services/feature/src/lib/service-variables-tabs/service-variables-utils.ts Hides Terraform variables for Blueprint services.
libs/domains/services/feature/src/lib/service-variables-tabs/service-variables-utils.spec.ts Tests Terraform tab visibility.
libs/domains/services/feature/src/lib/service-overview/service-header/service-header.tsx Revises Blueprint header metadata.
moderate (2 votes): Omitting the repository from useBlueprintUpdateState causes the pinned version badge to disappear for affected Terraform services when update lookup fails; pass the repository while keeping showRepository={false} or provide another valid local tag.
libs/domains/services/feature/src/lib/service-overview/service-header/service-header.spec.tsx Updates header metadata tests.
libs/domains/services/feature/src/lib/service-list/service-list-cells/service-version-cell.spec.tsx Updates Blueprint status tests.
libs/domains/services/feature/src/lib/service-blueprint-update-flow/blueprint-update-preview-step.tsx Supports page and modal preview layouts.
libs/domains/services/feature/src/lib/service-blueprint-update-flow/blueprint-update-preview-step.spec.tsx Tests modal preview behavior.
libs/domains/services/feature/src/lib/service-blueprint-update-flow/blueprint-update-flow.tsx Exports reusable update-flow components.
libs/domains/services/feature/src/lib/service-blueprint-update-flow/blueprint-update-flow-shell.tsx Supports configurable flow step titles.
libs/domains/services/feature/src/lib/service-blueprint-update-flow/blueprint-update-badge.tsx Clarifies Blueprint status labels.
libs/domains/services/feature/src/lib/service-blueprint-update-flow/blueprint-update-badge.spec.tsx Updates status badge tests.
libs/domains/services/feature/src/lib/service-blueprint-update-flow/blueprint-metadata.tsx Centralizes Blueprint metadata rendering.
moderate (3 votes): When versionBadge is empty, the component still renders an unnamed, focusable link; create the link only when versionBadge exists.
libs/domains/services/feature/src/lib/hooks/use-blueprint-variables/use-blueprint-variables.ts Loads persisted Blueprint variables.
libs/domains/services/feature/src/index.ts Exports Blueprint utilities and components.
nit (1 vote): Three exports are already present in this barrel; re-exporting them adds no API and makes the index harder to maintain.
libs/domains/services/data-access/src/lib/domains-services-data-access.ts Adds Blueprint variables query access.
libs/domains/service-settings/feature/src/lib/service-settings-layout/service-settings-layout.tsx Adds Blueprint-specific settings navigation.
moderate (2 votes): Sidebar restrictions do not protect directly reachable Terraform-specific routes such as terraform-arguments and deployment restrictions; add route-level guards or redirects for unsupported routes.
libs/domains/service-settings/feature/src/lib/service-settings-layout/service-settings-layout.spec.tsx Tests Blueprint settings navigation.
libs/domains/service-settings/feature/src/lib/service-general-settings/terraform-general-settings/terraform-general-settings.tsx Hides unsupported Terraform sections.
libs/domains/service-settings/feature/src/lib/service-general-settings/terraform-general-settings/terraform-general-settings.spec.tsx Tests Terraform Blueprint settings.
libs/domains/service-settings/feature/src/lib/service-general-settings/service-general-settings.tsx Adjusts Blueprint general-settings copy.
libs/domains/service-settings/feature/src/lib/service-general-settings/helm-general-settings/helm-general-settings.tsx Hides unsupported Helm sections.
libs/domains/service-settings/feature/src/lib/service-general-settings/helm-general-settings/helm-general-settings.spec.tsx Tests Helm Blueprint settings.
libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx Implements Blueprint configuration settings and preview flow.
moderate (1 vote): Successful updates do not emit blueprint_settings_updated; capture it only after update and deploy succeed.
moderate (1 vote): The promised blueprint_settings_visited event is not captured when the page is displayed.
moderate (2 votes): Validation only checks required fields, allowing invalid optional fields to reach Preview; include optional fields while retaining the existing-secret exception.
moderate (1 vote): Helm Blueprint catalog repository metadata is omitted; support service.source.git.git_repository as existing overview extraction does.
moderate (1 vote): contextVariable fields are omitted, so existing context overrides cannot be viewed or edited.
moderate (1 vote): Catalog manifest failures render as an empty valid configuration instead of an error or retry state.
moderate (1 vote): The root modal remains mounted after route unmount, leaving the preview over the new route with stale callbacks.
moderate (2 votes): Neither promised PostHog event is captured in this settings flow; add the visit event and emit the updated event only after both mutations succeed.
moderate (1 vote): A deploy-only failure rolls back persisted configuration from the optimistic cache; roll back only when the update mutation fails.
nit (1 vote): min(50vw, 900px) can make the modal unusably narrow on small viewports; use a viewport-safe width such as min(900px, calc(100vw - 32px)).
libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.spec.tsx Tests Blueprint configuration behavior.
libs/domains/service-settings/feature/src/index.ts Exports Blueprint settings.
apps/console/src/routeTree.gen.ts Registers the generated Blueprint configuration route.
apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/variables/route.tsx Hides Terraform variables navigation.
moderate (2 votes): The nested /variables/terraform route still accepts Blueprint Terraform services; guard it with hasTerraformVariablesTab or redirect when false.
apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/update/blueprint/route.tsx Returns the Blueprint update flow to settings.
apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/settings/blueprint-configuration.tsx Adds the Blueprint configuration route.
moderate (1 vote): Non-Blueprint services render null, leaving a blank settings area; redirect unsupported services to General as other service-specific routes do.
Review details

Suppressed comments (10)

apps/console/src/routes/_authenticated/organization/$organizationId/project/$projectId/environment/$environmentId/service/$serviceId/settings/blueprint-configuration.tsx:21

  • For a non-Blueprint service, this route returns null, leaving a blank settings content area when the URL is opened directly or from a stale link. The other service-specific settings routes redirect unsupported services to General; this route should do the same instead of rendering nothing.
  if (!organization || !service || !isBlueprintService(service)) {
    return null

libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx:304

  • The successful update path only shows a toast; it never emits the blueprint_settings_updated event promised in the PR description (and no such event exists elsewhere in the checkout). Capture it after both the update and deploy mutations succeed, so failed operations are not counted.
    try {
      await updateBlueprint({ blueprintId: service.blueprint_id, payload })
      await deployBlueprint({ blueprintId: service.blueprint_id })
      toast('success', 'Blueprint update started')

libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx:163

  • The PR description promises a blueprint_settings_visited PostHog event, but this new settings page has no posthog.capture call and the event name does not exist elsewhere in the checkout. Add the visit event when the Blueprint configuration page is displayed so the advertised analytics is actually emitted.
function BlueprintGeneralSettingsContent({ service, environmentId, organizationId }: BlueprintGeneralSettingsProps) {
  const { closeModal, openModal } = useModal()
  const { data, isLoading } = useBlueprint({ blueprintId: service.blueprint_id })
  const { data: persistedVariables = [], isLoading: isVariablesLoading } = useBlueprintVariables({
    blueprintId: service.blueprint_id,

libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx:83

  • Blueprint settings drops repository metadata for Helm Blueprint services because this helper only handles Terraform. The existing overview extraction handles Helm Git sources via service.source.git.git_repository (service-header.tsx:193), so the settings page shows no catalog repository for that supported service type.
function getBlueprintGitRepository(service: BlueprintService) {
  return service.serviceType === 'TERRAFORM' ? service.terraform_files_source?.git?.git_repository : undefined
}

libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx:239

  • The settings form only derives kind === 'variable' fields here. The creation flow also renders overridable contextVariable fields (blueprint-configuration-view.tsx:207-247), so those fields disappear from this page and Overrides is disabled when a Blueprint has context overrides but no optional variables. Existing Blueprint services with those overrides cannot view or edit them.
  const requiredFields = fields.filter(isRequiredVariableField)
  const optionalFields = fields.filter(isOptionalVariableField)

libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx:191

  • When the catalog manifest request fails, data remains undefined and isLoading becomes false, but isError is ignored and catalogFields defaults to an empty array. The page then renders an apparently valid empty configuration instead of an error/retry state, and can allow a user to continue without seeing the manifest.
  const { data: catalogFields = [], isLoading: isCatalogManifestLoading } = useBlueprintCatalogServiceManifest({
    organizationId,
    provider,
    serviceFamily,
    serviceVersion,

libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx:329

  • The preview is stored in the root ModalProvider, but this component does not close it when the settings route unmounts. Using browser Back or another route change while this non-dismissible modal is open leaves the preview mounted over the new route, with callbacks captured from the old page.
    openModal({
      content: (
        <>
          <Dialog.Title className="sr-only">Preview changes</Dialog.Title>
          <BlueprintPreview

libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx:305

  • This catch covers both mutations. If updateBlueprint succeeds but deployBlueprint fails, the persisted configuration is rolled back from the optimistic cache, so the page immediately shows stale values even though the update was saved. Roll back only when the update mutation fails and retain the optimistic values for a deploy-only failure.
    try {
      await updateBlueprint({ blueprintId: service.blueprint_id, payload })
      await deployBlueprint({ blueprintId: service.blueprint_id })
      toast('success', 'Blueprint update started')
    } catch {

libs/domains/service-settings/feature/src/lib/service-general-settings/blueprint-general-settings/blueprint-general-settings.tsx:345

  • min(50vw, 900px) makes this modal only 160px wide on a 320px viewport, while the content and footer each add 64px of horizontal padding. The preview and action buttons can overflow and become unusable on narrow screens; use a viewport-safe minimum such as min(900px, calc(100vw - 32px)).
        width: 'min(50vw, 900px)',

libs/domains/services/feature/src/index.ts:125

  • These three exports are already present in this barrel at lines 34, 43, and 44. Re-exporting them again adds no API and makes the index harder to maintain; keep only the new exports in this block.
export * from './lib/hooks/use-blueprint/use-blueprint'
export * from './lib/hooks/use-deploy-blueprint/use-deploy-blueprint'
export * from './lib/hooks/use-preview-blueprint-update/use-preview-blueprint-update'
export * from './lib/hooks/use-update-blueprint/use-update-blueprint'
  • Files reviewed: 33/34 changed files
  • Comments generated: 7
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread libs/shared/ui/src/lib/components/modal/modal.tsx

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 34 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread libs/shared/ui/src/lib/components/modal/modal.tsx
Comment thread libs/domains/services/feature/src/index.ts Outdated
- Capture visits, previews, updates, and update-badge clicks
- Add coverage for emitted PostHog events
- Use a numeric default width so the modal renders at 474px
- Add regression coverage for the default width
- Disable Preview when optional blueprint variables contain invalid values
- Add regression coverage for invalid optional fields
- Remove configurable step title props
- Keep the default review and preview labels fixed
- Reuse the service blueprint helper when hiding Terraform source settings
- Share blueprint repository resolution across settings and service header
- Pass Helm Git source repositories to blueprint metadata
- Keep Resources available for Terraform blueprints
- Update sidebar and blueprint settings coverage
- Roll back optimistic values only when the settings update fails
- Preserve persisted values when deployment fails
- Remove the fixed minimum height while preview output is pending
- Use merged Tailwind classes and add regression coverage
@rmnbrd rmnbrd self-assigned this Sep 18, 2026

@RemiBonnet RemiBonnet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small comments but otherwise LGTM, well done 👍

Comment thread libs/domains/services/feature/src/index.ts Outdated
Comment thread libs/shared/ui/src/lib/components/modal/modal-root.tsx
@rmnbrd
rmnbrd merged commit e33967c into staging Sep 18, 2026
8 checks passed
@rmnbrd
rmnbrd deleted the feat/qov-2278-blueprint-specific-settings branch September 18, 2026 13:44
@RemiBonnet

Copy link
Copy Markdown
Member

🎉 This PR is included in version 1.358.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants